	(function(window){
	//获取当前浏览器窗口
	var width = document.documentElement.clientWidth || document.body.clientWidth;
	//设置根节点的font-size
	document.documentElement.style.fontSize = width / 10 + "px";
	//当窗口大小变化时触发resize事件
	window.onresize = function(){
		//设置根节点的font-size
		document.documentElement.style.fontSize = (document.documentElement.clientWidth || document.body.clientWidth ) / 10 + "px"
	}
	})(window);
	app.controller("newController",["$scope",function($scope){
		$scope.left_Show = true;
		$scope.right_Show = false;
		$scope.isShow = true;
		$scope.classStyle1 = true;
		$scope.classStyle2 = false; 
		$scope.shou = function (){
			window.location.href='http://localhost/JPW/index.html#/mine';
		}

		//验证手机号
			var shouji=document.getElementsByClassName("zhanghan1")[0],
			dian = document.getElementsByClassName("dian")[0],text = document.getElementsByClassName("text")[0],geshi = document.getElementsByClassName("geshi")[0];
			function  shoujihao(){
				var shoujiname=/^1[3,5,7,8]\d{9}$/;
				var hh = shouji.value.length; 
				if (hh  >= 11) {
					if (!(shoujiname.test(shouji.value))) {
						
						geshi.style.display = "block"
						return false;
					}
					dian.style.color="red"
					return true;
				}else{
					geshi.style.display = "none"
					dian.style.color="#757575"
				};
				
			}
			shouji.oninput=shoujihao;
			shouji.onfocus = function(){
				geshi.style.display = "none"
			}

			//验证码
			var cun = document.getElementsByClassName("cun")[0]
			function chansheng(){
				cun.innerHTML="";
				var h=""
				var str="0123456789abcdefjhijklmnopqrstuvwxyzABCDEFJHIJKLMNOPQRSTUVWXYZ";
				
			       	for (var i = 0; i < 4; i++) {
			       	var a=parseInt(Math.random()*62);
			           h+=str[a];
			       } 
			         cun.innerHTML=h;       
			}
			dian.onclick=chansheng;
			cun.onclick = chansheng;
			chansheng();
			document.getElementById("tijiao").onclick = function(){
				if (text.value == cun.innerHTML) {
					console.log("hahah")
				};
			}
	}])
